import axios from '@/libs/api.request'
import {getFullUrl} from '../config'

let getUrl = getFullUrl('statistic');

//--------------------------------------GET
// 获取所有任务类型
export const listType = () => {
  return axios.request({
    url: getUrl('/task/type'),
    method: 'GET'
  })
}
// 获取所有模块
export const listModule = () => {
  return axios.request({
    url: getUrl('/task/module'),
    method: 'GET'
  })
}


//--------------------------------------GET
// 创建任务
export const addTask = (task) => {
  return axios.request({
    url: getUrl('/task/add'),
    method: 'POST',
    data: task
  })
}
